
@extends('public.father')
@section('css')





    <link href="/templates/hd/assets/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
    <link href="/templates/hd/assets/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

    <link href="/templates/hd/assets/css/personal.css" rel="stylesheet" type="text/css">
    <link href="/templates/hd/assets/css/colstyle.css" rel="stylesheet" type="text/css">





@endsection
@section('content')

    <div class="nav-table">
        <div class="long-title"><span class="all-goods">全部分类</span></div>

    </div>
    <b class="line"></b>
    <div class="center">
        <div class="col-main">
            <div class="main-wrap">

                <div class="user-collection">
                    <!--标题 -->
                    <div class="am-cf am-padding">
                        <div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">我的收藏</strong> / <small>My&nbsp;Collection</small></div>
                    </div>
                    <hr/>

                    <div class="you-like">
                        <div class="s-bar">
                            我的收藏
                        </div>
                        <div class="s-content">

                            @foreach($good as $v)
                            <div class="s-item-wrap">
                                <div class="s-item">

                                    <div class="s-pic">
                                        <a href="{{route('detail',$v['id'])}}" class="s-pic-link">
                                            <img src="{{explode(',',$v['pics'])[0]}}" alt="" title="" class="s-pic-img s-guess-item-img">
                                        </a>
                                    </div>
                                    <div class="s-info">
                                        <div class="s-title"><a href="#" >{{$v['title']}}</a></div>
                                        <div class="s-price-box">
                                            <span class="s-price"><em class="s-price-sign">¥</em><em class="s-value">42.50</em></span>
                                            <span class="s-history-price"><em class="s-price-sign">¥</em><em class="s-value">68.00</em></span>
                                        </div>
                                        <div class="s-extra-box">
                                            <span class="s-comment">单价: {{$v['mallprice']}}</span>
                                            <span class="s-sales">原价: {{$v['goodprice']}}</span>
                                        </div>
                                    </div>
                                    <div class="s-tp">
                                        <a href="javascrript:;" onclick="cangqu(this,{{$v['id']}})"><span class="ui-btn-loading-before">取消收藏</span></a>
                                        <i class="am-icon-shopping-cart"></i>
                                        
                                        </p>
                                    </div>
                                </div>
                            </div>

                            @endforeach
                        </div>

                        <div class="s-more-btn i-load-more-item" data-screen="0"><i class="am-icon-refresh am-icon-fw"></i>更多</div>

                    </div>

                </div>


                <script>

                    function cangqu(obj,id) {
                        // alert(123);
                        $.ajax({
                            url:'/cangqu/'+id,
                            type:'get',
                            success:function (res) {
                                // console.log
                                if (res.volid){
                                    $(obj).parents('.s-item-wrap').remove()
                                }
                            }
                        })
                    }


                </script>




            </div>

        </div>

     @include('public.aside')
    </div>

@endsection
